Information, such as an Internet protocol (IP for short) address, a virtual local area network (VLAN for short), and a route, needs to be set on a relevant port of a computer device, in particular a network device, such as a switch, a router, or a server, according to a user requirement before the computer device works properly, so that the device can correctly bear a relevant service and complete a set function. Information such as a port IP address, a VLAN, and a routing table saved in a device is known as configuration information of the device, and the information is generally customized on a device at operating field and is indispensable. The configuration information is generally saved on a storage medium of the device. If the device becomes faulty and needs to be replaced with a same device, a standby device also requires the same configuration information to substitute the faulty device to work properly. Therefore, configuration information backup needs to be performed.
In an implementation manner in the prior art, a management port, such as a serial port or a network port, is arranged on a device. A serial port or a network port of a computer, such as a personal desktop computer or a laptop computer, is used to connect to a management port of a faulty device to login the faulty device, and configuration information is copied from a storage medium of the faulty device to the computer. Then, the computer is connected to a management port of a standby device by using the same method, the configuration information is copied from the computer to the standby device, and configuration information backup is completed. This backup method takes a long time, and is unacceptable if a service cannot be rapidly recovered after being interrupted in scenarios such as industrial control and monitoring. In addition, this backup method must use a computer to complete backup and requires professional maintenance personnel who is familiar with device maintenance and management.
In another implementation manner in the prior art, a pluggable storage medium, such as a universal serial bus (USB for short) flash disk (USB flash disk, U-disk for short), a secure digital card (SD card for short), or a multimedia card (MMC card for short) is configured on a device to save configuration information of the device. When the device operates properly, the configuration information is read from the pluggable storage medium configured on the device. When the device becomes faulty, the pluggable storage medium is removed from the device and inserted into a standby device, and then the standby device may obtain the configuration information. Alternatively, a device provides a USB interface, an MMC card interface, an SD card interface, or the like. A pluggable storage medium, such as a U-disk or an SD card, is inserted into a faulty device, and configuration information is copied to the pluggable storage medium through a simple operation, such as pressing a button or turning on a switch. Then, the pluggable storage medium is inserted into a standby device, the configuration information backed up on the pluggable storage medium can be copied to the standby device through a simple operation similarly, and configuration information backup is completed. Although this backup method is simple in operation, configuration information saved on a pluggable storage medium is easily damaged, lost, or the like, which results in low reliability. In addition, a pluggable storage medium is likely to be acquired by a third party, which results in problems such as a leak and malicious tampering of information, and therefore, the security of pluggable storage medium is low.